package com.atguigu.strategy;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description:
 * @create: 2022-04-04 09:37
 **/
public abstract class Duck {
    public Duck() {
    }

    /**
     * 显示鸭子信息
     */
    public abstract void display();

    public void quack(){
        System.out.println("鸭子嘎嘎叫~~~");
    }

    public void swim(){
        System.out.println("鸭子会游泳~~");
    }

    public void fly(){
        System.out.println("鸭子会飞翔~~");
    }
}
